function [c] = sdsread()

[f, p] = uigetfile('*.csv', 'read .csv file from sds system');
if(isempty(f))
    return;
end;

hf = fopen([p f]);
if(isempty(hf))
    fprintf(1, 'Failed to open file %s\n', [p f]);
    return;
end;

c=cell(12,1);
k = 1;
fgetl(hf); % toss the first line
while(~feof(hf))
    s = fgetl(hf);
    [t, r] = strtok(s, ',');
    c{k}.well = str2num(t);
    [t, r] = strtok(r, ',');
    c{k}.pr=unblank(t);
    i = 1;
    while(~isempty(r))
        [t, r] = strtok(r, ',');
        rn(i) = str2num(t);
    i = i + 1;
    end;
    c{k}.rn = rn;
    c{k}.cy = [1:length(rn)];
    k = k + 1;
end;
fclose(hf)
clf;
hold off;
for i = 1:length(c)
    if(strmatch(c{i}.pr, 'Kv1.'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'r-');
    end;
    if(strmatch(c{i}.pr, 'Kv3.'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'g-');
    end;
    if(strmatch(c{i}.pr, 'Kv4.'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'b-');
    end;
    if(strmatch(c{i}.pr, '18s'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'c-');
    end;
        if(strmatch(c{i}.pr, 'xPR1'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'r-');
    end;
    if(strmatch(c{i}.pr, 'PR2'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'g-');
    end;
    if(strmatch(c{i}.pr, 'xPR3'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'b-');
    end;
    if(strmatch(c{i}.pr, 'xPR4'))
        hold on
        plot(c{i}.cy, c{i}.rn, 'c-');
    end;


end;